#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
using namespace std;
void test() {
	vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	for (auto e : v1) {
		cout << e << " ";
	}
	cout << endl;

	vector<int>::iterator it = find(v1.begin(),v1.end(),2);
	if (it != v1.end()) {
		v1.insert(it, 20);
	}
	for (auto e : v1) {
		cout << e << " ";
	}
	cout << endl;
	it = find(v1.begin(), v1.end(), 3);
	if (it != v1.end()) {
		v1.erase(it);
	}
	for (auto e : v1) {
		cout << e << " ";
	}
	cout << endl;

}
int main() {
	test();
	return 0;
}